/**
 * 星空
 */
function star() {
    let stars = 800;
    let $stars = document.getElementById('stars');
    let r = 800;
    for (let i = 0; i < stars; i++) {
        if (window.CP.shouldStopExecution(1)) {
            break;
        }
        // var $star = $('<div/>').addClass("star");
        let $star = document.createElement("div");
        $star.setAttribute("class","star");
        $stars.appendChild($star)
    }

    window.CP.exitedLoop(1);
    for(let i = 0;i < $stars.children.length;i++){
        let cur = $stars.children[i];
        let s = 0.2 + Math.random();
        let curR = r + Math.random() * 100;
        cur.style.transformOrigin = '0 0 ' + curR + 'px';
        cur.style.transform = ' translate3d(0,0,-' + curR + 'px) rotateY(' + Math.random() * 360 + 'deg) rotateX(' + Math.random() * -50 + 'deg) scale(' + s + ',' + s + ')'
    }
}
star();